package com.twt.recruit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.twt.recruit.entity.ApplicationInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ApplicationInfoMapper extends BaseMapper<ApplicationInfo> {
    @Select("select application_id from application_info where project_id = #{projectId} and group_id=#{groupId} and status = #{status}")
    List<Integer> getApplicationIdsByProjectIdAndGroupId(Integer projectId, Integer groupId, Integer status);

    @Delete("delete from application_info where project_id = #{projectId}")
    void delApplicationInfoByProjectId(Integer projectId);
}
